Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change config for public devnet #143

Merged
merged 2 commits into from
Jun 20, 2023
Merged

Conversation

dartdart26
Copy link
Collaborator

Since we now have gas costs for FHE operations, set block gas limit to 100000000 gas. As a reference, an ERC20 transfer estimates to around 1220732 gas for euint32, meaning a block could have up to 100 ERC20 transfers. These values might change as we test more, but we need a starting point.

Since we now have compact ciphertexts for input, set max block size to 4194304 (4MB).

Disable the personal and debug namespaces on the JSON-RPC server.

Reinstate the minimum gas price to 0.0001aevmos (as it was before our FHE modifications).

Put a gas cap of 500000000 gas for eth_call (i.e. view functions) over the JSON-RPC interface. That limits the amount of computation users can do "for free" over JSON-RPC.

Remove custom gas prices and adjustments that we added initially when we worked with bigger ciphertexts and proofs.

Since we now have gas costs for FHE operations, set block gas limit to
100000000 gas. As a reference, an ERC20 transfer estimates to around
1220732 gas for euint32, meaning a block could have up to 100 ERC20
transfers. These values might change as we test more, but we need a
starting point.

Since we now have compact ciphertexts for input, set max block size to
4194304 (4MB).

Disable the `personal` and `debug` namespaces on the JSON-RPC server.

Reinstate the minimum gas price to 0.0001aevmos (as it was before our
FHE modifications).

Put a gas cap of 500000000 gas for `eth_call` (i.e. view functions) over
the JSON-RPC interface. That limits the amount of computation users can
do "for free" over JSON-RPC.

Remove custom gas prices and adjustments that we added initially when
we worked with bigger ciphertexts and proofs.
Copy link
Contributor

@tremblaythibaultl tremblaythibaultl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff 👍

@dartdart26
Copy link
Collaborator Author

After internal discussion, lowered the JSON-RPC gas cap to 1/2 max block gas (i.e. 50M gas).

@dartdart26 dartdart26 merged commit be4e092 into v9.1.0-zama Jun 20, 2023
@dartdart26 dartdart26 deleted the petar/gas-and-rpc-conf branch June 20, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants